package com.example.demo1101.demo4;


public class Girl extends Thread {
    public Girl() {
    }

    public void run() {
        synchronized(LockObject.lock2) {
            System.out.println(Thread.currentThread().getName() + "获取画板");
            synchronized(LockObject.lock1) {
                System.out.println(Thread.currentThread().getName() + "获取画笔");
                System.out.println(Thread.currentThread().getName() + "可以画画了");
            }

        }
    }
}
